version 14.2

set more off

*     ***************************************************************** *;
*     ***************************************************************** *;
*   File-Name:  nonstate.do		                                        *;
*   Date:       October 5, 2020	                                        *;
*   Author:     Dellmuth, Lisa Maria                                    *;
*   Purpose:    Replicate results for paper "Empowering NGOs" in Global *;
*   Environmental Change 65 (2020)                                      *;
*   Input File: nsa-all.dta	                                        *;
*     ****************************************************************  *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*     Code variable sample to replicate results for sample used in paper*;
*     ****************************************************************  *;



*Load data set and tsset
***************************
 
use nsa-all.dta, clear

tsset speciesnum year



*Statistical tests
***************************
tsset  // unbalanced panel
xtdescribe 
xtsum 

xtreg engo  L(1).(ffmsy bbmsy budget_cpi) meeting_interv_num ms_sd i.year, fe robust
testparm i.year  
*jointly equal to zero, therefore time fixed-effects are needed 

*Multicollinearity test
collin ffmsylag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd


*Unit root tests
xtunitroot fisher engopropp, dfuller lags(0) // assumes t tends to infinity 
xtunitroot fisher engo, dfuller lags(0) // assumes t tends to infinity 
*these are dickey-fuller tests
*All four of the tests strongly reject the null hypothesis that all the panels contain unit roots. 
xtunitroot fisher engopropp, pperron lags(1) // assumes t tends to infinity
xtunitroot fisher engo, pperron lags(1) // assumes t tends to infinity
*pperron gives phillips-perron tests


*Heteroscedasticity 
xtreg engo  ffmsylag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd, fe 
xttest3 
*As significant at 1 percent level, we use heteroskedasticity-robust standard errors

*multicollinearity? example - no issue
collin ffmsy engopropp researchpropp peakpropp consultancypropp consultancypropp companypropp budget_cpi meeting_interv_num ms_sd


*Estimate models explaining CSO abundance
******************************************************


*     ****************************************************************  *;
*   Table 1
*     ****************************************************************  *;

*Table 1

xtpoisson engo ffmsylag1 bbmsylag1 consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 llanded_valton, fe vce(robust) 

*coefficients are semi-elasticities, so  if xih increases by one unit, 
*100βh indicates the approximately estimated percentage change of E(yi|xi, β).

eststo m1

xtpoisson engo lffmsylanlag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr




*Appendix
***************************

*Table S2
#delimit ; 
logout, save(table-corr) word replace: 
corr engo engopropp bbmsy ffmsy  researchpropp consultancypropp companypropp budget_cpi age meeting_interv_num ms_sd
ms_range ms_num;
#delimit cr

*Granger-causality tests, example (Table S3)

preserve 
drop if ffmsy==.
sum ffmsy
collapse ffmsy engo, by(speciesnum year)
tab year
qui pvar ffmsy engo, lags(1)
pvargranger 

preserve 
drop if ffmsy==.
sum ffmsy
collapse ffmsy engopropp, by(speciesnum year)
tab year
qui pvar ffmsy engopropp, lags(1)
pvargranger 


preserve 
drop if lffmsylan==.
sum lffmsylan
collapse lffmsylan engo, by(speciesnum year)
tab year
qui pvar lffmsylan engo, lags(1)
pvargranger 

preserve 
drop if lffmsylan==.
sum lffmsylan
collapse lffmsylan engopropp, by(speciesnum year)
tab year
qui pvar lffmsylan engopropp, lags(1)
pvargranger 


preserve 
drop if ffmsygr==.
sum ffmsygr
collapse ffmsygr engo, by(speciesnum year)
tab year
qui pvar ffmsygr engo, lags(1)
pvargranger 

preserve 
drop if ffmsygr==.
sum ffmsygr
collapse ffmsygr engopropp, by(speciesnum year)
tab year
qui pvar ffmsygr engopropp, lags(1)
pvargranger 

preserve 
drop if bbmsy==.
su bbmsy
collapse bbmsy engo, by(speciesnum year)
tab year
qui pvar bbmsy engo, lags(5)
pvargranger 


preserve 
drop if bbmsy==.
su bbmsy
collapse bbmsy engopropp, by(speciesnum year)
tab year
qui pvar bbmsy engopropp, lags(5)
pvargranger 



*     ****************************************************************  *;
*   Robustness checks for Table 1
*     ****************************************************************  *;

*without bbmsy

xtpoisson engo ffmsylag1  llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m1
xtpoisson engo lffmsylanlag1  llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr  llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag2  llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag2  llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2  llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1-withoutbbmsy.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr


*with ms_num instead of dem_sd

xtpoisson engo ffmsylag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp ms_num lbudget_cpi1000 , fe vce(robust) irr
eststo m1
xtpoisson engo lffmsylanlag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp ms_num lbudget_cpi1000 , fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp ms_num lbudget_cpi1000 , fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp ms_num lbudget_cpi1000 , fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp ms_num lbudget_cpi1000 , fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp ms_num lbudget_cpi1000 , fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1-withms_num.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr


*with industrypropp instead of companypropp

xtpoisson engo ffmsylag1 bbmsylag1 llanded_valton consultancypropp industrypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m1
xtpoisson engo lffmsylanlag1 bbmsylag1 llanded_valton consultancypropp industrypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr bbmsylag1 llanded_valton consultancypropp industrypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag2 bbmsylag2 llanded_valton consultancypropp industrypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag2 bbmsylag2 llanded_valton consultancypropp industrypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2 bbmsylag2 llanded_valton consultancypropp industrypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1-withindustrypropp.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr


*with variables lagged 3 and 4 years

xtpoisson engo ffmsylag3 bbmsylag3 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m1
xtpoisson engo lffmsylanlag3 bbmsylag3 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr bbmsylag3 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag4 bbmsylag4 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag4 bbmsylag4 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2 bbmsylag4 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 , fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1-withlags3and4.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr


*From 1995


xtpoisson engo ffmsylag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>1994, fe vce(robust) irr
eststo m1
xtpoisson engo lffmsylanlag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>1994, fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>1994, fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>1994, fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>1994, fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>1994, fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1_from1995.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr


*From 2004


xtpoisson engo ffmsylag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>2004, fe vce(robust) irr
eststo m1
xtpoisson engo lffmsylanlag1 bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>2004, fe vce(robust) irr
eststo m2
xtpoisson engo ffmsygr bbmsylag1 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>2004, fe vce(robust) irr
eststo m3 
xtpoisson engo ffmsylag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>2004, fe vce(robust) irr
eststo m4
xtpoisson engo lffmsylanlag2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>2004, fe vce(robust) irr
eststo m5
xtpoisson engo ffmsygr2 bbmsylag2 llanded_valton consultancypropp companypropp ///
researchpropp dem_sd lbudget_cpi1000 if year>2004, fe vce(robust) irr
eststo m6

#delimit ;
esttab m1 m2 m3 m4 m5 m6 using table1_from2004.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) 
se(%9.2f) bic scalars(ll N) nodepvars eform replace;
#delimit cr
